{{ extend '../_layouts/home.html' }}

{{ block 'title' }}@{{ currentuser.nickname }} 的个人主页 - node技术社区{{ /block }}

{{ block 'body' }} 
<section class="container">
    <div class="col-md-9">
        <div class="bg3Color">
            <div class="user_header">
                <ul class="breadcrumb">
                    <li><a href="/" class="breadcrumb-active">主页</a></li>
                    <li> </li>
                </ul>
            </div>
            <div class="userInfo-detail">
                <div class="user_avatar_this">
                    <img src="{{ currentuser.avatar }}" alt="" title="{{ currentuser.nickname }}">
                </div>
                <span>{{ currentuser.nickname }}</span>
                <p class="userInfo_score">{{ currentuser.score }} 积分</p>
                <p class="userInfo_score">邮箱 {{ currentuser.email }}</p>
                <p class="created_time">注册时间 {{ fromNowFormat(currentuser.created_time) }}</p>
            </div>
        </div>
        <div class="bg3Color margintop">
            <div class="user_header">
                <ul class="breadcrumb">
                    <li>最近创建的话题</li>
                </ul>
            </div>
            {{ if topic!='' }}
            <div class="topic_create">
                <ul class="topic-list" id="listInfo">
                    {{ each topic }}
                    <li class="createdTopic-list-item">
                        <a href="/settings/{{$value.users[0].nickname}}" class="pullme-left avatar marginright" title="{{$value.users[0].nickname}}">
                            <img src="{{$value.users[0].avatar}}" alt="">
                        </a>
                        <span class="pullme-right beforeTime">{{fromNowFormat($value.created_time)}}</span>
                        <div class="newtopic-title-wrapper">
                            <a href="/topic/show/{{ formateId($value._id) }}" class="newtopic_title pullme-left" title="{{$value.title}}">{{$value.title}}</a>
                            <div class="clear pullme-left">
                                <span class="call_num" title="回复数">{{$value.call_num}}/</span><span class="click_num" title="点击数">{{$value.click_num}}</span>
                                <span class="topic-type">{{$value.type}}</span>
                            </div>
                        </div>
                    </li>
                    {{/each }}
                </ul>
            </div>
            <div class="created_more">
                <a href="/settings/{{currentuser.nickname}}/topics">查看更多»</a>
            </div>
            {{ else }}
            <div class="topic_create">
                <p class="topic_none">无话题</p>
            </div>
            {{ /if }}
        </div>
        <div class="bg3Color margintop">
            <div class="user_header">
                <ul class="breadcrumb">
                    <li>最近参与的话题</li>
                </ul>
            </div>
            {{ if comment!='' }}
            <div class="topic_participate">
                <ul class="topic-list" id="commentInfo">
                    {{ each comment cmt }}
                    <li class="createdTopic-list-item addme">
                        {{ each authors author }}
                        {{ if formateId(cmt.topics[0].uId)==formateId(author._id) }}
                        <a href="/settings/{{author.nickname}}" class="pullme-left avatar marginright" title="{{author.nickname}}">
                            <img src="{{author.avatar}}" alt="">
                        </a>
                        {{ /if }}
                        {{ /each }}
                        <span class="pullme-right beforeTime">{{fromNowFormat(cmt.topics[0].created_time)}}</span>
                        <div class="newtopic-title-wrapper">
                            <a href="/topic/show/{{ formateId(cmt.topics[0]._id) }}" class="newtopic_title pullme-left" title="{{cmt.topics[0].title}}">{{cmt.topics[0].title}}</a>
                            <div class="clear pullme-left">
                                <span class="myellipsis">{{cmt.content}}</span>
                            </div>
                        </div>
                    </li>
                    {{/each }}
                </ul>
            </div>
            <div class="created_more">
                <a href="/settings/{{currentuser.nickname}}/replies">查看更多»</a>
            </div>
            {{ else }}
            <div class="topic_participate">
                <p class="topic_none">无话题</p>
            </div>
            {{ /if }}
        </div>
    </div>
    <div class="col-md-3">
        <div class="bg3Color">
            <div class="user_header">
                <ul class="breadcrumb">
                    <li>个人信息</li>
                </ul>
            </div>
            <div class="user-info">
                <a href="/settings/{{currentuser.nickname}}" class="user-avatar">
                    <img src="{{ currentuser.avatar }}" alt="">
                </a>
                <a href="/settings/{{currentuser.nickname}}" class="user-nickname">{{ currentuser.nickname }}</a>
                <div class="score">
                    <span>积分：{{ currentuser.score }}</span>
                </div>
                <div class="bio">
                    <span>" {{ currentuser.bio }} "</span>
                </div>
            </div>
        </div>
    </div>
</section>
{{ /block }}
